﻿using AppService.IService.System_operation;
using Domain.Entity.System_operation;
using Domain.Entity.System_Ordermanagement;
using Domain.IRepository.System_operation;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.DependencyInjection;

namespace AppService.Service.System_operation
{
    [Dependency(ServiceLifetime.Scoped)]
    public class Signature_receiptService : ISignature_receiptService
    {
        
        private readonly ISignature_receiptRepository sr_Repository;

        public Signature_receiptService(ISignature_receiptRepository SrRepository)
        {
            this.sr_Repository = SrRepository;
        }

        public int Count(string? Sign_time, string? value2, string? Ord_startaddress, string? Ord_destination)
        {
            return sr_Repository.Count(Sign_time, value2, Ord_startaddress, Ord_destination);
        }

        public Orders GetOrd_id(int id)
        {
            return sr_Repository.GetOrd_id(id);
        }

        public List<Signature_receipt> GetSignature_receipt(int currentPage,int PageSize)
        {
            return sr_Repository.GetSignature_receipt().Skip((currentPage - 1) * PageSize).Take(PageSize).ToList();
        }

        public List<Signature_receipt> GetSign_XQ(int Ord_id)
        {
            return sr_Repository.GetSign_XQ(Ord_id);
        }

        public List<Signature_receipt> Sign_condition(string? Sign_time, string? value2, string? Ord_startaddress, string? Ord_destination, int currentPage, int PageSize)
        {
            return sr_Repository.Sign_condition(Sign_time,value2,Ord_startaddress,Ord_destination,currentPage,PageSize);
        }
    }
}
